<script lang="ts">
  import { Hand, RefreshCcw } from "lucide-svelte";
  import { drawStore } from "../store.svelte";
</script>

<div
  class="flex gap-4 bg-surface-200-800 text-primary-900-100 rounded-[10px] p-2"
>
  <button
    type="button"
    title="移动"
    class={`btn p-1 hover:bg-surface-300-700 ${drawStore.curToolInfo == "move" ? "bg-surface-300-700" : ""}`}
    onclick={(e) => {
      e.stopPropagation();
      e.preventDefault();
      drawStore.curToolInfo = "move";
    }}
  >
    <Hand size={20} />
  </button>
  <button
    type="button"
    title="刷新数据"
    class={`btn p-1 hover:bg-surface-300-700`}
    onclick={(e) => {
      e.stopPropagation();
      e.preventDefault();
      drawStore.loadNodeList().then(() => {
        drawStore.loadEdgeList();
      });
    }}
  >
    <RefreshCcw size={20} />
  </button>
</div>
